package com.cmcc.pp.ui.platformmonitoring;

import android.os.Bundle;

import com.cmcc.pp.R;
import com.cmcc.pp.base.BActivity;
import com.cmcc.pp.ui.widget.HddAndTimeTrend;

import java.util.ArrayList;
import java.util.HashMap;

import butterknife.Bind;

/**
 * Created by ABC on 2017/12/29.
 * 服务器详情
 */

public class ServerDetailsActivity extends BActivity{
//    @Bind(R.id.activityServerDetail_trendEndNum)
//    TrendView trendEndNum;
//    @Bind(R.id.activityServerDetail_trendHDDCapacity)
//    TrendView trendHDDCapacity;
//    @Bind(R.id.activityServerDetail_timeList)
//    RecyclerView timeList;
    @Bind(R.id.activityServerDetail_trendView)
    HddAndTimeTrend trendView;
    @Override
    protected boolean getHasTitle() {
        return true;
    }

    @Override
    public int getContentLayoutId() {
        return R.layout.activity_serverdetails;
    }

    @Override
    public void initView(Bundle savedInstanceState) {
        getHeader().setTitle("192.168.1.2");

        ArrayList<HashMap<String, String>> trendNumList = new ArrayList<>();
        HashMap<String, String> hashMap = new HashMap<>();
        hashMap.put("terminalNum", "5000");
        hashMap.put("time", "11.20");
        trendNumList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("terminalNum", "2000");
        hashMap.put("time", "11.20");
        trendNumList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("terminalNum", "3000");
        hashMap.put("time", "11.20");
        trendNumList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("terminalNum", "1000");
        hashMap.put("time", "11.20");
        trendNumList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("terminalNum", "4000");
        hashMap.put("time", "11.20");
        trendNumList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("terminalNum", "2500");
        hashMap.put("time", "11.20");
        trendNumList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("terminalNum", "1300");
        hashMap.put("time", "11.20");
        trendNumList.add(hashMap);


        ArrayList<HashMap<String, String>> trendHddList = new ArrayList<>();
        hashMap = new HashMap<>();
        hashMap.put("capacity", "500");
        hashMap.put("time", "11.20");
        trendHddList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("capacity", "200");
        hashMap.put("time", "11.20");
        trendHddList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("capacity", "300");
        hashMap.put("time", "11.20");
        trendHddList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("capacity", "100");
        hashMap.put("time", "11.20");
        trendHddList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("capacity", "400");
        hashMap.put("time", "11.20");
        trendHddList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("capacity", "250");
        hashMap.put("time", "11.20");
        trendHddList.add(hashMap);
        hashMap = new HashMap<>();
        hashMap.put("capacity", "130");
        hashMap.put("time", "11.20");
        trendHddList.add(hashMap);

        trendView.setData(trendNumList, trendHddList);
    }

    @Override
    public void loadData() {

    }
}
